import { reqTrademarkList } from "@/api/product/trademark/trademark"

const state = {
  // 品牌列表数据
  trademarkList:{}
}

const mutations = {
  TRADEMARKLIST(state,trademarkList){
    state.trademarkList = trademarkList
  }
}


const actions = {
  // 获取品牌管理的数据
 async getTrademarkList({commit},{pageCurrent,pageSize}){
  try {
    let result = await reqTrademarkList(pageCurrent,pageSize)
    // console.log(result);
    if(result.code===200){
     commit('TRADEMARKLIST',result.data)
     return 'ok';
    }
  } catch (error) {
    
  }
  }
}


const getters = {}


export default {
    namespaced: true,
    state,
    mutations,
    actions,
    getters
  }